package haxe.util;

interface Collection<T>
{
	public var size(getSize,null):Int;
	public function isEmpty():Bool;
	public function clear():Void;
	public function toArray():Array<T>;
	public function add(o:T):Void;
	public function remove(o:T, ?equals: T->T->Bool ):Bool;
	public function iterator():Iterator<T>;
	public function removeAll(c:Collection<T>, ?equals: T->T->Bool ):Bool;
	public function addAll( c:Collection<T> ):Void;
	public function containsAll(c:Collection<T>, ?equals: T->T->Bool ):Bool;
	public function contains(o:T, ?equals: T->T->Bool ):Bool;
	
	private function getSize():Int;
}
